#pragma once
#include "fiberhandle_global.h"

extern "C" FIBERHANDLE_EXPORT int reg(char *sn);

extern "C" FIBERHANDLE_EXPORT int download(char *url, char *filename);
extern "C" FIBERHANDLE_EXPORT int get_url_content(char *url, unsigned char *get_buff, int get_buff_len);

extern "C" FIBERHANDLE_EXPORT int unzip(unsigned char *in_content, int in_content_len, unsigned char *out_content, int out_content_len);
extern "C" FIBERHANDLE_EXPORT int dozip(unsigned char *in_content, int in_content_len, unsigned char *out_content, int out_content_len);

extern "C" FIBERHANDLE_EXPORT int get_json_string(char *json_file, char *key, unsigned char *value, int value_len);
extern "C" FIBERHANDLE_EXPORT int get_json_int(char *json_file, char *key);

extern "C" FIBERHANDLE_EXPORT int sqlite_get_table_key_count(char *json_file, char *db_file, char *table_name);
extern "C" FIBERHANDLE_EXPORT int sqlite_get_table_key(char *json_file, char *db_file, char *table_name, int num, char *content, int content_len);
extern "C" FIBERHANDLE_EXPORT int sqlite_create_db(char *json_file, char *db_file);
extern "C" FIBERHANDLE_EXPORT int sqlite_delete_db(char *db_file);
extern "C" FIBERHANDLE_EXPORT int sqlite_insert(char *json_file, char *db_file, char *table_name, char *insert_keys[], char *insert_values[], int count);
extern "C" FIBERHANDLE_EXPORT int sqlite_query(char *json_file, char *db_file, char *table_name, char *sql_command);